package com.gdhz.xiaohengqin.device.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * @author Swallows
 * @date 2025-05-30 10:44
 */
@Getter
@Setter
@NoArgsConstructor
public class WieGandRequest {

    private String jsonrpc = "2.0";

    private String method;

    private List<Params> params;

    private long id = System.currentTimeMillis();

    @Getter
    @Setter
    @NoArgsConstructor
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class Params {

        @JsonProperty("设备序列号")
        private int deviceSn;

        @JsonProperty("门号")
        private int doorNo;

        @JsonProperty("控制方式")
        private String controlMethod;

        @JsonProperty("开门延时(秒)")
        private Integer openHoldTime;
    }
}
